package com.travel.service.impl;

import com.sun.prism.Texture;
import com.travel.dao.HotelOrderDao;
import com.travel.dao.impl.HotelOrderDaoImpl;
import com.travel.entity.HotelOrder;
import com.travel.service.HotelOrderService;
import com.travel.util.PageInfo;

/**
* @Title HotelOrderServiceImpl.java
* @Package com.travel.service.impl
* @Author zengbochao
* @Time 2020年10月30日 上午10:25:11
* @Version 1.0
* @Description: TODO
*/
public class HotelOrderServiceImpl implements HotelOrderService{
	private HotelOrderDao hotelOrderDao=new HotelOrderDaoImpl();
	@Override
	public PageInfo<HotelOrder> getUserIdByPage(int pageNum, int pageSize, String userName) {
		if (pageNum <= 0) {
			pageNum = 1;
		}
		if (pageSize <= 0) {
			pageSize = 2;
		}
		return hotelOrderDao.findByPage(pageNum, pageSize, userName);
	}
	@Override
	public boolean insert(HotelOrder hotelOrder) {
		// TODO Auto-generated method stub
		return hotelOrderDao.insert(hotelOrder)>0?true:false;
	}
	@Override
	public boolean deletById(int hotelOrderId) {
		// TODO Auto-generated method stub
		return hotelOrderDao.deleteById(hotelOrderId)>0?true:false;
	}

}
